-------------------------------------------------------------------
--                           AmB UI                              --
-------------------------------------------------------------------
AmB = AmB or { }
AmB.UI = AmB.UI or { }

--Include parts
if SERVER then
	AddCSLuaFile("ui/cl_contentpanel.lua")
	AddCSLuaFile("ui/cl_contentgrid.lua")
	AddCSLuaFile("ui/cl_contentsplitter.lua")
	AddCSLuaFile("ui/cl_list.lua")
	AddCSLuaFile("ui/cl_paddedpanel.lua")
	AddCSLuaFile("ui/cl_frame.lua")
	AddCSLuaFile("ui/cl_textcontrol.lua")
	AddCSLuaFile("ui/cl_scrollbar.lua")
	AddCSLuaFile("ui/cl_effectspanel.lua")
	AddCSLuaFile("ui/cl_list.lua")
else
   --Helper functions for coloring
   function SetSurfaceToColor(Color)
      surface.SetDrawColor(Color.r, Color.g, Color.b, Color.a)
   end
   function SetSurfaceToBlend(ColorStart, ColorEnd, Factor)
      surface.SetDrawColor(
         (ColorEnd.r - ColorStart.r) * Factor + ColorStart.r,
         (ColorEnd.g - ColorStart.g) * Factor + ColorStart.g,
         (ColorEnd.b - ColorStart.b) * Factor + ColorStart.b,
         (ColorEnd.a - ColorStart.a) * Factor + ColorStart.a)
   end
   function SetSurfaceTextToColor(Color)
      surface.SetTextColor(Color.r, Color.g, Color.b, Color.a)
   end
   surface.CreateFont("Tahoma", 20, 700, true, false, "AmBTitleFont")

	include("ui/cl_contentpanel.lua")
	include("ui/cl_contentsplitter.lua")
	include("ui/cl_contentgrid.lua")
	include("ui/cl_paddedpanel.lua")
	include("ui/cl_frame.lua")
	include("ui/cl_textcontrol.lua")
	include("ui/cl_scrollbar.lua")
	include("ui/cl_effectspanel.lua")
	include("ui/cl_list.lua")
end
